package com.drinkian.business.good.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.drinkian.authentication.entity.po.User;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("trans_good")
public class Good {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long uploaderId;
    private String name;
    private String description;
    private String label;
    private String originPrice;
    private String sellPrice;
    private Integer status;
    @TableLogic
    private Integer deleted;
    private LocalDateTime createTime;
    @TableField(value = "modify_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime modifyTime;
    @TableField(exist = false)
    private User uploader;
    // 商品图片
    @TableField(exist = false)
    private List<GoodPicture> image;
}
